home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)aaq.d64
/
digger
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
10KB
|
289 lines
2 CLR:POKE53281,0:POKE53280,8:PRINT"[147]"+CHR$(142):MINER=1278:BANK=500:G=500
3 BUY=0:GOSUB2000
4 FORL=1344TO1983:X=INT(2*RND(1))+1:IFX=1THENX=174
5 IFX=2THENX=160
6 POKEL,X:POKEL+54272,9:NEXT
7 FORL=1304TO1343:POKEL,102:POKEL+54272,12:NEXT
8 FORL=1984TO2023:POKEL,102:POKEL+54272,12:NEXT
9 FORL=1304TO1984STEP40:POKEL,102:POKEL+39,102:POKEL+54272,12:POKEL+54311,12
10 NEXT:PRINT" [175][175][172][162][162][187][175][175] GOLD:$ [164][164][164][164][164][164][164]
11 [153]" GET BANK ABS YOU HAVE: (null) (null) (null)LISTSPC(SPC(
12 PRINT" [207][207][207][207][207][207][207][208] $ [163][163] [214] [212][155][166][166]
13 [153]" (null)USRUSRUSRUSRUSRUSR(null) SPC(SPC(SPC(SPC(LISTSPC(SPC(
14 PRINT" [204][175][175][175][175][175][175][186] [144]E[166][155][166][166]
15 [153]"SPC(SPC(SPC(SPC(LISTSPC(SPC(
16 FORL=1TO9:PRINT"[155][166] [166][166][166][166]":NEXT
17 PRINT" "
18 PRINT"[145][145][145] "
20 FORL=1TO17:POKEMINER,32:MINER=MINER+1:POKEMINER,88:POKEMINER+54272,1
30 FORA=1TO25:NEXT:NEXT
100 PRINT""
110 FORL=1TO10
115 PRINT" [214] [212]"
120 PRINT"[166][166][166][166]"
130 PRINT"[216] [166]"
140 PRINT"[166][166][166][166]"
145 PRINT"[145][145][145]";:MINER=MINER+40
150 NEXT:MINER=MINER-40:BANK=BANK-25:MINER=1655:GOTO300
160 PRINT"":FORL=1TO10
170 PRINT"[166][166][166][166]"
180 PRINT" [216][166]"
190 PRINT"[166][166][166][166]"
200 PRINT" "
210 PRINT"[145][145][145][145][145]";:MINER=MINER-40:NEXT:MINER=MINER+40:FORL=1TO19
220 POKEMINER,32:MINER=MINER-1:POKEMINER,88:POKEMINER+54272,1
230 FORA=1TO25:NEXT:NEXT
240 PRINT"YOU HAVE "OUNCE"[157] OUNCES.":BANK=BANK+(G*OUNCE):OUNCE=0
250 FORL=1TO1000:NEXT
255 PRINT" "
260 FORL=1TO10:PRINT""BANK"[157] "
265 PRINT""BANK"[157] ":NEXT
299 BANK=BANK-25:GOTO20
300 REM MOVEMENT OF MINER
310 IFMINER=1657 THEN160
312 GETG$:IFG$<>""THEN318
313 A=INT(7*RND(1))+1:IFA=3THENGOSUB1200
314 IFBANK<0 THEN BANK=0:GOTO1300
315 PRINT""BANK"[157] "
316 IFBANK>=30000 THEN 1500
317 POKE56322,0:J=PEEK(56320):T=JAND16:J=15-(JAND15):POKE56322,255:GOTO320
318 IFG$="/"ORG$="?"THEN20000
319 GOTO326
320 IFJ=1THENMOVE=-40:GOTO330
321 IFJ=2THENMOVE=+40:GOTO330
322 IFJ=4THENMOVE=-1:GOTO330
323 IFJ=8THENMOVE=+1:GOTO330
324 IFT=16 GOTO310
325 GOTO900
326 IFG$="B"THEN10000
327 IFG$="P"THEN1000
328 IFG$="Q"THEN1300
329 GOTO300
330 IFPEEK(MINER+MOVE)=230THENGOTO1000
331 IFPEEK(MINER+MOVE)=218THENGOTO300
332 IFPEEK(MINER+MOVE)=233THENGOTO300
333 IFPEEK(MINER+MOVE)=0THENGOTO300
334 IFPEEK(MINER+MOVE)=102THENGOTO300
340 IFPEEK(MINER+MOVE)=160THENGOTO400
341 IFPEEK(MINER+MOVE)=32 THENGOTO450
342 IFPEEK(MINER+MOVE)=174THENGOTO500
345 IFPEEK(MINER+MOVE)=19+128THEN600
346 IFPEEK(MINER+MOVE)=104+128THEN700
347 IFPEEK(MINER+MOVE)=6+128THEN800
349 IFPEEK(MINER+MOVE)=135THEN1100
400 FORL=1TO3:POKEMINER+MOVE,30:POKEMINER+MOVE+54272,1:POKE54296,1
405 POKE54296,0:FORA=1TO55:NEXT
410 POKEMINER+MOVE,31:POKEMINER+MOVE+54272,1:FORA=1TO55:NEXT:NEXT:BANK=BANK-5
450 POKEMINER,32:MINER=MINER+MOVE:POKEMINER,88:POKEMINER+54272,1
460 REM IDENTIFY NEXT BLOCK
500 REM IDENTIFY NEXT BLOCK
510 IFPEEK(MINER+MOVE)=160THEN599
511 IFPEEK(MINER+MOVE)=32THEN599
513 IFPEEK(MINER+MOVE)<>174THEN599
520 A=INT(10*RND(1))+1:IFA=1THENROCK=90 :ITEM$="SOLID ROCK AHEAD":GOTO540
521 IFA=2THENROCK=19:ITEM$="SPRING AHEAD":GOTO540
522 IFA=3THENROCK=105:ITEM$="SHALE ROCK":GOTO540
523 IFA=4THENROCK=104:ITEM$="SANDSTONE":GOTO540
524 IFA=5THENROCK=104:ITEM$="SANDSTONE":GOTO540
526 IFA=7THENROCK=90:ITEM$="SOLID ROCK AHEAD":GOTO540
527 IFA=8THENROCK=105:ITEM$="SHALE ROCK":GOTO540
528 IFA=9THENROCK=104:GOTO540
529 IFA=10THENROCK=19:ITEM$="SPRING AHEAD":GOTO540
530 IFA=6THEN ROCK=7:ITEM$="GOLD NUGGETS AHEAD!!"
540 POKEMINER+MOVE,ROCK+128:POKEMINER+MOVE+54272,3
541 IFPEEK(MINER+MOVE)=135THENPOKEMINER+MOVE+54272,7
545 PRINT""ITEM$:FORL=1TO600:NEXT:
550 PRINT" "
599 GOTO300
600 REM FLOOD FROM SPRING
601 FORL=54272TO54296:POKEL,0:NEXT:POKE54296,15:POKE54277,190:POKE54278,200
602 FORL=15TO1STEP-1:POKE54273,37:POKE54272,160:POKE54276,129
603 POKE54273,17:POKE54272,230:POKE54276,129:NEXT
605 PRINT"SPRING-FLOODING!!!"
610 FORL=MINER+1TO2023:IFPEEK(L)=32THENPOKEL,0:POKEL+54272,14
620 NEXT
625 PRINT" "
626 OUNCE=0
627 PRINT"LOST ALL YOUR GOLD!!!":GOSUB799:GOSUB799:GOSUB799:GOSUB799
628 PRINT" "
699 POKE54296,0:GOTO300
700 REM CAVE IN FROM SANDSTONE
701 FORL=54272TO54296:POKEL,0:NEXT:POKE54296,15:POKE54277,190:POKE54278,200
702 FORL=15TO1STEP-1:POKE54273,37:POKE54272,160:POKE54276,129:POKE54296,L
703 NEXT:GOSUB4000
705 PRINT"SANDSTONE CAVE-IN"
706 GOSUB799:GOSUB799
710 IFPEEK(MINER-39)<>102THENPOKEMINER-39,232:POKEMINER-39+54272,3
720 IFPEEK(MINER+2)<>102THENPOKEMINER+2,232:POKEMINER+54272+2,3:GOSUB799
721 IFPEEK(MINER-41)<>102THENPOKEMINER-41,232:POKEMINER+54272-41,3:GOSUB4000
723 IFPEEK(MINER+39)<>102THENPOKEMINER+39,232:POKEMINER+54272+39,3:GOSUB799
724 IFPEEK(MINER+3)<>102THENPOKEMINER+3,232:POKEMINER+54272+3,3
795 OUNCE=0:POKE54276,128:POKE54296,0
796 PRINT"LOST ALL YOUR GOLD!!!":GOSUB799:GOSUB799:GOSUB799:GOSUB799
797 PRINT" "
798 GOTO300
799 FORL=1TO300:NEXT:RETURN
800 REM FOUND GOLD NUGGETS
899 GOTO300
900 REM DYNAMITE BLASTING
905 PRINT"DYNAMITE BLASTING"
906 IFMOVE=0THENMOVE=-1
907 FORL=54272TO54296:POKEL,0:NEXT:POKE54296,15:POKE54277,190:POKE54278,200
908 FORL=15TO1STEP-1:POKE54273,INT(255*RND(1))+1:POKE54272,INT(255*RND(1))+1
909 POKE54276,129:NEXT:GOSUB4000
910 IF(MINER+MOVE+MOVE)>1983THEN913
911 IF(MINER+MOVE+MOVE)<1344THEN913
912 IFPEEK(MINER+MOVE+MOVE)<>102THENPOKEMINER+MOVE+MOVE,32:FORL=1TO300:NEXT
913 IFPEEK(MINER+1)<>102THENPOKEMINER+1,32
915 IFPEEK(MINER-40)<>102THENPOKEMINER-40,32
916 IFPEEK(MINER-1)=102THEN918
917 POKEMINER-1,32
918 GOSUB4000:IFPEEK(MINER+40)<>102THENPOKEMINER+40,32
995 PRINT" "
999 POKE54296,0:BANK=BANK-200:GOTO300
1000 REM PUMPING WATER
1005 IFPEEK(MINER+MOVE)<>0THEN300
1010 PRINT"PUMPING WATER"
1020 FORL=1TO300:NEXT
1030 PRINT" "
1099 BANK=BANK-100:GOTO400
1100 REM FOUND GOLD
1110 PRINT"FOUND GOLD!!!";
1115 NUGGS=INT(2*RND(1))+2:PRINT" "NUGGS"[157] OUNCES!!!":FORL=1TO500:NEXT
1120 OUNCE=OUNCE+NUGGS:PRINT" "
1130 GOTO450
1200 REM CHANGE PRICE OF GOLD
1210 A=INT(10*RND(1))+1:IFA=<5THENA=A-A-A
1211 IFA>5THENA=A-5
1215 G=G+(A):IFG<200THENG=200
1220 PRINT"$"G"[157]/OUNCE"
1230 RETURN
1300 REM BUST-END OF GAME
1305 IFBANK>0THEN1380
1310 PRINT""BANK"[157] "
1320 PRINT"YOU RAN OUT OF MONEY!!!! ":GOSUB799:GOSUB799:GOSUB799
1330 PRINT"TIME TO CLOSE THE MINE. ":GOSUB799:GOSUB799:GOSUB799
1340 PRINT"PLAY AGAIN? (Y/N) "
1345 PRINT" "
1346 PRINT" "
1347 PRINT" "
1350 GETG$:IFG$="Y"THENCLR:RUN
1360 IFG$<>"N"THEN1350
1370 GOTO1400
1380 PRINT"YOU WANT TO QUIT THE GAME? (Y/N)"
1381 GETG$:IFG$="Y"THENPRINT"PLAY AGAIN? (Y/N)[146] ":GOTO1350
1382 IFG$<>"N"THEN1381
1383 PRINT" "
1384 GOTO300
1400 REM END STATEMENTS
1405 PRINT"[147]"
1410 GOTO5000
1500 REM WON GAME
1510 PRINT"YOU REACHED YOUR GOAL!!! ":GOSUB799:GOSUB799:GOSUB799
1520 PRINT"YOU MADE OVER $30000!!! ":GOSUB799:GOSUB799:GOSUB799
1530 PRINT"PLAY AGAIN? (Y/N) "
1545 PRINT" "
1546 PRINT" "
1547 PRINT" "
1550 GOTO1350
2000 REM SET UP AND INSTRUCTIONS
2005 PRINT" [175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175]"
2010 PRINT" [182]MINER-MINER-MINER-MINER-MINER-MINER[181]"
2020 PRINT" [183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183]"
2021 PRINT" COMMODORE-64 VERSION"
2022 PRINT" BY IAN PHILLIPS"
2030 PRINT" INSTRUCTIONS? (Y/N)"
2031 GETG$:IFG$="N"THEN3000
2032 IFG$<>"Y"THEN2031
2040 PRINT"[147] YOU'RE SEARCHING FOR GOLD IN AN OLD "
2041 PRINT" MINE SHAFT. YOUR GOAL IS TO "
2044 PRINT" FIND $30,000 IN GOLD. WHEN YOU HAVE "
2045 PRINT" FOUND SOME GOLD ([158]G[146]) ENTER THE "
2046 PRINT" ELEVATOR AND YOU WILL MAKE A JOURNEY"
2047 PRINT" TO THE BANK-WHERE THE PRICE OF GOLD "
2048 PRINT" HAS BEEN CONSTANTLY CHANGING. SOUND"
2049 PRINT" EASY? WELL IT'S NOT.":GOSUB2080
2050 PRINT"[147] YOU MAY FIND YOURSELF TRAPPED IN A "
2051 PRINT"SANDSTONE CAVE-IN, OR FLOODED BY A"
2052 PRINT"NATURAL SPRING. IF THIS HAPPENS, YOU"
2053 PRINT"MAY LOSE ALL YOUR GOLD!! YOU MAY FIND"
2054 PRINT"THAT YOU NEED TO BLAST THROUGH SOLID"
2055 PRINT"ROCK. TO USE DYNAMITE, PRESS THE FIRE-"
2056 PRINT"BUTTON ON YOUR JOYSTICK. DYNAMITE CAN"
2060 PRINT"BLAST THROUGH ANYTHING, BUT IT COSTS"
2061 PRINT"$200!! IF THERE IS A FLOOD YOU WILL"
2062 PRINT"HAVE TO PUMP YOUR WAY OUT WITH THE"
2063 PRINT"P[146]-KEY. IT TOO COSTS MONEY! EACH SPACE"
2064 PRINT"YOU DIG COSTS MONEY. EACH RIDE ON THE"
2065 PRINT"ELEVATOR COSTS MONEY TOO!!":GOSUB2080:GOSUB2100
2070 PRINT"[147] THE FOLLOWING SYMBOLS IDENTIFY THESE"
2071 PRINT"OBJECTS:"
2072 PRINT" [158]G[146]- GOLD"
2073 PRINT" [159]S[146]- SPRING"
2074 PRINT" [159][168][146]- SANDSTONE"
2075 PRINT" [159][218][146]- SOLID ROCK"
2076 PRINT" [159][169][146]- SHALE ROCK"
2077 PRINT" [154]@- WATER"
2079 GOSUB2080:GOTO2300
2080 PRINT" [158] PRESS A KEY TO CONTINUE"
2085 GETG$:IFG$=""THEN2085
2090 RETURN
2100 PRINT"[147] AT SOME POINT IN THE GAME YOU MAY"
2110 PRINT" FIND THAT YOU WILL NOT MAKE THE "
2120 PRINT" $30000. WHEN MOST OF THE SCREEN HAS"
2130 PRINT" BEEN CLEARED, OR WHEN THE GOING GETS"
2140 PRINT" TOUGH, YOU CAN BUY SOME MORE LAND, "
2150 PRINT" OR--GET A NEW SCREEN. HOWEVER, THIS"
2160 PRINT" WILL COST YOU 80% OF YOUR SAVINGS!!"
2170 PRINT" THIS ALSO CAN BE DONE ANY NUMBER"
2180 PRINT" OF TIMES. TO B[146]UY SOME NEW LAND,"
2190 PRINT" PRESS B[146]--FOR B[146]UY."
2200 GOSUB2080:RETURN
2300 PRINT"[147] THESE ARE YOUR CONTROLS:"
2310 PRINT" JOYSTICK IN PORT 2"
2320 PRINT" FIREBUTTON-DYNAMITE"
2340 PRINT" P -PUMPS WATER"
2350 PRINT" B -BUYS NEW LAND"
2351 PRINT" ? -LISTS YOUR OPTIONS"
2360 PRINT" Q -QUIT THE GAME"
2370 GOSUB2080
3000 PRINT"[147]":RETURN
4000 REM -----SHAKE SCREEN--------
4010 POKE53265,PEEK(53265)AND247:POKE53270,PEEK(53270)AND247
4020 POKE53265,(PEEK(53265)AND248)+7:POKE53270,(PEEK(53270)AND248)+7:FORY=1TO9
4030 FORP=6TO0STEP-1:POKE53265,(PEEK(53265)AND248)+P
4040 POKE53270,(PEEK(53270)ANDINT(247*RND(1))+1)+P:FORX=1TO50:NEXTX,Y
4050 POKE53270,PEEK(53270)OR8:POKE53265,PEEK(53265)OR8
4060 POKE52365,255:POKE53270,200
4070 RETURN
5000 REM --------END END END----------
5100 GOTO30000
10000 REM --BUY MORE LAND--
10001 GETJUNK$:IFJUNK$<>""THEN10001
10002 G$=""
10005 IFOUNCE=0THEN10010
10006 PRINT" FIRST BRING YOUR GOLD TO THE BANK!! ":FORL=1TO7000:NEXT
10007 PRINT" "
10008 GETJUNK$:IFJUNK$<>""THEN10008
10009 GOTO300
10010 ZXC=INT(((80*BANK)/100)*1)/1
10015 PRINT"IT'LL COST YOU $"ZXC"[157].":FORL=1TO4000:NEXT
10900 MINER=1278:BANK=BANK-ZXC+25:PRINT"[147]"
10901 GETJUNK$:IFJUNK$<>""THEN10901
10902 GOTO4
20000 REM LIST OPTIONS
21000 PRINT"FIRE-BUTTON[146] FOR DYNAMITE"
21010 FORL=1TO1000:NEXT
22000 PRINT"P[146] TO PUMP WATER "
22010 FORL=1TO1000:NEXT
23000 PRINT"B[146] TO BUY NEW LAND"
23010 FORL=1TO1000:NEXT
24000 PRINT"Q[146] TO QUIT THIS GAME"
24010 FORL=1TO1000:NEXT
25000 PRINT"?[146] TO LIST OPTIONS "
25010 FORL=1TO1000:NEXT
26000 PRINT" ":GOTO300
30000 POKE53265,(PEEK(53265)AND248)+3
30002 PRINT"[147]LOAD"CHR$(34)"HELLO"CHR$(34)",8":PRINT"RUN"
31000 POKE631,13:POKE632,13:POKE198,2